hysop.backend.device.opencl.opencl_kernel_autotuner module

class hysop.backend.device.opencl.opencl_kernel_autotuner.OpenClKernelAutotuner(name, tunable_kernel, **kwds)[source]

Bases: KernelAutotuner

Initialize a KernelAutotuner.

Parameters:
  • name (str) – Name of this Autotuner for logging and caching purposes.

  • tunable_kernel (TunableKernel) – The kernel to be tuned.

autotuner_config_key()[source]

Caching key for autotuner results.

bench_one_from_binary(kernel, target_nruns, global_work_size, local_work_size, old_stats, best_stats)[source]

Compile and bench one kernel by executing it nruns times. Return the compiled kernel, KernelStatistics and whether it was pruned or not.

build_from_source(kernel_name, kernel_src, build_options, force_verbose, force_debug)[source]

Compile and bench one kernel by executing it nruns times. Return a AutotunerKernelStatistics instance.

check_kernel(tkernel, kernel, global_work_size, local_work_size)[source]
check_kernel_args(kernel, args_list)[source]
collect_kernel_infos(tkernel, extra_parameters, extra_kwds)[source]

Collect kernel infos before computing workload and work group size.